package com.example.housemanage

import com.example.housemanage.entity.HouseManageEntityItem
import com.example.lib_base.http.HttpType
import com.example.lib_base.http.NotWorkFactory
import com.example.lib_base.mvvm.BaseRepo
import javax.inject.Inject

class HouseManageRepo @Inject constructor() : BaseRepo() {
    val apiService by lazy { NotWorkFactory.getRetrofit(HttpType.TOKEN).create(HouseManageApiService::class.java) }

    suspend fun addProperty(property: HouseManageEntityItem) = apiService.addProperty(property)
    suspend fun deleteProperty(id: Int) = apiService.deleteProperty(id)
    suspend fun updateProperty(property: HouseManageEntityItem) = apiService.updateProperty(property)
}